//ORIGINAL SOURCE
/*
function Lock() {
	var future = new Future();

	this.wait = function() {
		future.result();
	}
	
	this.notify = function() {
		future.fulfill();
	}
	
};
*/

function Lock(){var future,_cp=1;var _f=_frm(arguments);return _f.clsr(function(){_s:while(1){switch(_cp){case 1:_cp=2;case 2:if((_f.v2=_f._new(
Future))===_S){break _s;}future=_f.v2;

this.wait=function(){var _f = _frm(arguments);var _cp=_f.scp;_s:while(1){switch(_cp){case 1:_cp=2;case 2:if((_f.v2=
future.result())===_S){break _s;}return;case 0:_cp=_f.cp;}}return _f.sus(_cp,this)};


this.notify=function(){var _f = _frm(arguments);var _cp=_f.scp;_s:while(1){switch(_cp){case 1:_cp=2;case 2:if((_f.v2=
future.fulfill())===_S){break _s;}return;case 0:_cp=_f.cp;}}return _f.sus(_cp,this)};return;}}return _f.sus(this)}).call(this)}
